<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" href="/static/in.css" type="text/css" />
<title>{{ title }}::BluemaskBlog</title>
{% block header %}{% endblock %}
</head>


<body class="normal">
<div id="headbar">
	<div id="rlogin">
		<a href="/">回站点首页</a> | {% if not user.authenticated %}
		<a href="/admin/signin/">登录</a>{% else %}
		<strong>{{ user.username }}</strong> 已登录 
		<a href="/admin/signout/">注销</a>{% endif %}
	</div>
</div>

<div id="topbar"><h3>Bluemask Blog</h3></div>
<div id="content">
	<div id="sidebar">
		<div class='menu'>
		<ul>{% if user.authenticated %}
			<li><a href='/admin/'>欢迎</a></li>
			<li><h3>文章和评论</h3></li>
			<li><a href='/admin/posts/draft/'>写新文章</a></li>
			<li><a href='/admin/posts/'>文章管理</a></li>
			<li><a href='/admin/categories/'>栏目设置</a></li>
			<li><a href='/admin/comments/'>评论管理</a></li>
			<li><h3>杂项</h3></li>
			<li><a href='/admin/links/'>友情链接</a></li>
			<li><h3>个人设置</h3></li>
			<li><a href='/admin/settings/'>资料修改</a></li>
			<li><a href='/admin/password_update/'>密码修改</a></li>
			{% if user.isroot %}
			<li><h3>管理选项</h3></li>
			<li><a href='/admin/users/'>用户管理</a></li>
			{% endif %}
			{% else %}
			<li><a href='/admin/signin/'>登录</a></li>
			{% endif %}
		</ul>
		</div>
	</div>
	<div id="mainarea">
		<!-- content starts -->
		{% if subtitle %}
			<h2>{{ subtitle }}</h2>
			{% if back_link %}
				<div id='top_backlink'>
					<a href='{{ back_link.url }}'>{{ back_link.text }}</a>
				</div>
			{% endif %}
		{% endif %}
		{% block main %}
		{% endblock %}
		<!-- content ends -->		
	</div>
	<div class='clear'></div>
</div>
<div id="copyright">
	Powered by BluemaskBlog v0.1<br /> 
</div>
</body>
</html>
